package com.gua.jbs.serviceImpl;

import com.gua.jbs.bean.RegisterBean;
import com.gua.jbs.dao.IRegistrationDao;
import com.gua.jbs.daoImpl.RegistrationDao;
import com.gua.jbs.service.IRegistrationService;
import com.gua.jbs.utility.EncryptionDecryption;

public class RegistrationService extends BaseService implements
		IRegistrationService {

	public void register(RegisterBean registerBean) {
		try {
			String password = EncryptionDecryption.encrypt(registerBean.getPassword());
			IRegistrationDao registrationDao = new RegistrationDao();
			registrationDao.saveUser(registerBean.getUserName(), password);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

}
